﻿using Medianamik.Core;
using Medianamik.Core.DAL.Repositories;
using Medianamik.UI.Web.Shop.Data;
using Medianamik.UI.Web.Shop.Data.Repositories;
using Medianamik.UI.Web.MVP.Presentation;
using ICategory = Medianamik.UI.Web.Shop.Data.Interfaces.ICategory;

namespace Medianamik.UI.Web.Shop.Presentation.Presenters
{
    public class CategoryListPresenter<T, TView> : ModulePresenterWithGrid<T, TView,
        ICategoryRepository<T>, INodeTypeRepository, IMedianamikRepository<IMedianamikDTOWithName>> 
        where T : class, ICategory
        where TView : class, ICategories
    {
        public CategoryListPresenter(TView view,
            ICategoryRepository<T> categoryRepository,
            INodeTypeRepository nodeTypeRepository, IMedianamikRepository<IMedianamikDTOWithName> baseTypeRepository)
            : base(view, categoryRepository, nodeTypeRepository, baseTypeRepository)
        {
        
        }
    }

    public class CategoryListPresenter : CategoryListPresenter<Category, ICategories>
    {
        public CategoryListPresenter(ICategories view, ICategoryRepository<Category> categoryRepository,
            INodeTypeRepository nodeTypeRepository, IMedianamikRepository<IMedianamikDTOWithName> baseTypeRepository) :
            base(view, categoryRepository, nodeTypeRepository, baseTypeRepository)
        {
        }
    }
}
